

package org.come.Jpanel;

import com.tool.btn.FormsOnOffBtn;
import com.tool.tcpimg.UIUtils;
import com.updateNew.MyIsif;

import java.awt.Color;
import java.awt.Dimension;
import java.awt.LayoutManager;
import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JPanel;

import org.come.Frame.LingbaoJframe;
import org.come.mouslisten.ChoseLingbaoTypeMouslisten;

public class LingbaoJpanel extends JPanel {
    private LingbaoJframe lingbaoJframe;
    private LingbaoCardJpanel lingbaoCardJpanel;
    private JButton btnEquipment;
    private JButton btnAttribute;

    public LingbaoJpanel(LingbaoJframe lingbaoJframe) throws Exception {
        this.lingbaoJframe = lingbaoJframe;
        this.lingbaoCardJpanel = new LingbaoCardJpanel();
        this.setBackground(UIUtils.Color_BACK);
        this.setLayout((LayoutManager) null);
        if ("水墨UI".equals(MyIsif.getStyle())) {
            this.setPreferredSize(new Dimension(538, 469));
            // 关闭按钮事件
            FormsOnOffBtn offBtn = new FormsOnOffBtn("inkImg/old/2/1.png", 1, 43);
            offBtn.setBounds(538 - 37, 10, 25, 25);
            this.add(offBtn);
            this.btnEquipment = new JButton();
            this.btnEquipment.setBounds(40, 35, 35, 82);
            this.btnEquipment.addMouseListener(new ChoseLingbaoTypeMouslisten("灵宝装备", this.lingbaoCardJpanel));
            this.btnEquipment.setBackground(UIUtils.Color_BACK);
            this.btnEquipment.setBorder(BorderFactory.createEmptyBorder());
            this.btnEquipment.setBorderPainted(false);
            this.btnEquipment.setContentAreaFilled(false);
            this.btnEquipment.setHorizontalTextPosition(0);
            this.add(this.btnEquipment);
            this.btnAttribute = new JButton();
            this.btnAttribute.setBounds(40, 111, 35, 82);
            this.btnAttribute.addMouseListener(new ChoseLingbaoTypeMouslisten("灵宝属性", this.lingbaoCardJpanel));
            this.btnAttribute.setBackground(UIUtils.Color_BACK);
            this.btnAttribute.setBorder(BorderFactory.createEmptyBorder());
            this.btnAttribute.setBorderPainted(false);
            this.btnAttribute.setContentAreaFilled(false);
            this.btnAttribute.setHorizontalTextPosition(0);
            this.add(this.btnAttribute);
            this.lingbaoCardJpanel.setBounds(0, 0, 538, 469);
            this.add(this.lingbaoCardJpanel);
        } else {
            this.setPreferredSize(new Dimension(512, 496));
            FormsOnOffBtn offBtn = new FormsOnOffBtn("inkImg/hongmu/2/8_jpg.button.btn_close.jpg", 1, 43);
            offBtn.setBounds(492, 0, 23, 23);
            this.add(offBtn);
            this.btnEquipment = new JButton();
            this.btnEquipment.setBounds(23, 54, 26, 82);
            this.btnEquipment.addMouseListener(new ChoseLingbaoTypeMouslisten("灵宝装备", this.lingbaoCardJpanel));
            this.btnEquipment.setBackground(UIUtils.Color_BACK);
            this.btnEquipment.setBorder(BorderFactory.createEmptyBorder());
            this.btnEquipment.setBorderPainted(false);
            this.btnEquipment.setContentAreaFilled(false);
            this.btnEquipment.setHorizontalTextPosition(0);
            this.add(this.btnEquipment);
            this.btnAttribute = new JButton();
            this.btnAttribute.setBounds(23, 130, 26, 82);
            this.btnAttribute.addMouseListener(new ChoseLingbaoTypeMouslisten("灵宝属性", this.lingbaoCardJpanel));
            this.btnAttribute.setBackground(UIUtils.Color_BACK);
            this.btnAttribute.setBorder(BorderFactory.createEmptyBorder());
            this.btnAttribute.setBorderPainted(false);
            this.btnAttribute.setContentAreaFilled(false);
            this.btnAttribute.setHorizontalTextPosition(0);
            this.add(this.btnAttribute);
            this.lingbaoCardJpanel.setBounds(0, 0, 512, 496);
            this.add(this.lingbaoCardJpanel);
        }

    }

    public LingbaoJframe getLingbaoJframe() {
        return this.lingbaoJframe;
    }

    public void setLingbaoJframe(LingbaoJframe lingbaoJframe) {
        this.lingbaoJframe = lingbaoJframe;
    }

    public LingbaoCardJpanel getLingbaoCardJpanel() {
        return this.lingbaoCardJpanel;
    }

    public void setLingbaoCardJpanel(LingbaoCardJpanel lingbaoCardJpanel) {
        this.lingbaoCardJpanel = lingbaoCardJpanel;
    }

    public JButton getBtnEquipment() {
        return this.btnEquipment;
    }

    public void setBtnEquipment(JButton btnEquipment) {
        this.btnEquipment = btnEquipment;
    }

    public JButton getBtnAttribute() {
        return this.btnAttribute;
    }

    public void setBtnAttribute(JButton btnAttribute) {
        this.btnAttribute = btnAttribute;
    }
}
